home *** CD-ROM | disk | FTP | other *** search
- PXFFORK(3F) Last changed: 1-6-98
-
-
- NNAAMMEE
- PPXXFFFFOORRKK - Creates a process
-
- SSYYNNOOPPSSIISS
- SSUUBBRROOUUTTIINNEE PPXXFFFFOORRKK ((_i_p_i_d,, _i_e_r_r_o_r))
- IINNTTEEGGEERR _i_p_i_d,, _i_e_r_r_o_r
-
- IIMMPPLLEEMMEENNTTAATTIIOONN
- UNICOS, UNICOS/mk, and IRIX systems
-
- DDEESSCCRRIIPPTTIIOONN
- On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
- default when compiling programs with the MIPSpro 7 Fortran 90 compiler
- or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
- 7.2 F77 compiler.
-
- The PPXXFFFFOORRKK routine uses the ffoorrkk(2) system call to create a new
- process. The child process is the same as the parent process except
- for the following:
-
- * The child process has a unique, currently unused process ID.
-
- * The child process has a different parent process ID. The child
- process's process ID is the parent process, or calling process, ID.
-
- * The child process has its own copy of the parent's file descriptors.
- Each of the child's file descriptors shares a common file pointer
- with the corresponding file descriptor of the parent process.
-
- * Process locks are not inherited by the child process (see pplloocckk(2)).
-
- * The uuttiimmee, ssttiimmee, ccuuttiimmee, and ccssttiimmee of the child process are set to
- 0. The time left until an alarm clock signal is reset to 0.
-
- * All sseemmaaddjj values are cleared (see sseemmoopp(2)).
-
- * The parent's set of pending signals are not inherited by the child.
-
- UNICOS and UNICOS/mk systems only:
-
- * Record locks set by the parent process are not inherited by the
- child process (see ffccnnttll(2) and lloocckkff(3C)).
-
- * In a multitasking group, only the process that executed the fork
- system call is copied.
-
- * Each attached shared memory segment is attached and the value of
- sshhmm__nnaattttcchh in the data structure associated with the shared memory
- segment is incremented by 1.
-
- IRIX systems only:
-
- * File locks previously set by the parent are not inherited by the
- child (see ffccnnttll(2)).
-
- * Page locks are not inherited (see mmppiinn(2) on IRIX systems).
-
- * The time left until an _i_t_i_m_e_r signal is reset to 0.
-
- * The child will not inherit the ability to make graphics calls. The
- child process may receive a segmentation fault upon attempting to
- make a graphics call, unless it initializes itself as a graphics
- process via wwiinnooppeenn(()) or ggiinniitt(()). Currently, if the parent is a
- graphics process, the child's attempt to become a graphics process
- will fail.
-
- * The share mask is set to 0 (see sspprroocc(2)).
-
- When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
- UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
- kind unless documented otherwise. On UNICOS and UNICOS/mk, default
- kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
- IRIX, the default kind is KKIINNDD==44.
-
- The following is a list of arguments for this routine:
-
- _i_p_i_d An output integer variable. _i_p_i_d will be zero for the child
- process and the process ID of the child for the parent
- process.
-
- _i_e_r_r_o_r An output integer variable that contains zero if PPXXFFFFOORRKK was
- successful or nonzero if PPXXFFFFOORRKK was not successful.
-
- The PPXXFFFFOORRKK routine may return any of the following error values:
-
- EEAAGGAAIINN If the system-imposed limit on the total number of processes
- under execution in the whole system (NNPPRROOCC) is exceeded or
- if the system-imposed limit on the total number of processes
- under execution by one user (CCHHIILLDD__MMAAXX) is exceeded.
-
- UNICOS and UNICOS/mk systems only:
-
- EEBBUUSSYY If you attempt to enable accounting when it is already
- enabled, or if you issue a rreessttaarrtt(2) attempt when another
- job or process in the system is using the jid or any pid
- associated with the job (or process) to be restarted.
-
- EEIINNTTRR If an asynchronous signal (such as interrupt or quit), which
- you have elected to catch, occurred during a fork system
- call. When execution resumed after processing the signal,
- the interrupted system call returned this error condition.
-
- EEMMEEMMLLIIMM If more memory space was requested than is allowed for the
- processes attached to this lnode. The maximum value is set
- by the --cc option of the sshhrraaddmmiinn(8) command. This error
- appears only on systems running the fair-share scheduler.
-
- EENNOOEEXXEECC If a request was made to execute a file that, although it
- has the appropriate permissions, does not start with a valid
- magic number (see aa..oouutt(5)).
-
- EENNOOMMEEMM If during an eexxeecc(2) or ssbbrreeaakk(2) system call, a program
- requested more space than the system could supply. This is
- not a temporary condition; the maximum space specification
- is a system parameter.
-
- EEPPRROOCCLLIIMM If more processes were requested than are allowed for this
- lnode. The maximum value is set by the --pp option of the
- sshhrraaddmmiinn(8) command. This error appears only on systems
- running the fair-share scheduler.
-
- IRIX systems only:
-
- EEAAGGAAIINN If the amount of system memory required is temorarily
- unavailable.
-
- EENNOOSSPPCC If the caller is a member of a share group and the total
- number of share group members plus child processes exceeds
- the maximum number of users specified by the uussccoonnffiigg(3P)
- command (8 by default). Any changes made with uussccoonnffiigg (3P)
- must be done Ibeforethe first sproc is formed.
-
- EENNOOLLCCKK There are not enough file locks in the system.
-
- EEXXAAMMPPLLEESS
- program pxftest
- integer ipid, ierror
-
- CALL PXFFORK(ipid, ierror)
- if (ipid .eq. 0) then
- print *,'child'
- else
- print *,'parent'
- endif
- end
-
- SSEEEE AALLSSOO
- eexxeecc(2), ffccnnttll(2), ffoorrkk(2), pplloocckk((22)),, rreessttaarrtt(2), sseemmoopp(2), sspprroocc(2),
- ssssbbrreeaakk(2)
- sshhrraaddmmiinn(8)
-
-
- _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
- 2165, for the printed version of this man page.
-
-